Skip to content

Conversation

sheetalkamat
Copy link
Member

Fixes #1548

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies how TypeScript library files are referenced in build info (tsbuildinfo) files by encoding only the library file name instead of its full path. This change reduces the file size of build info files and makes them more portable across different environments.

Key changes:

  • Library file names in build info are shortened from full paths like "../../../../tslibs/TS/Lib/lib.esnext.full.d.ts" to just filenames like "lib.esnext.full.d.ts"
  • Build info file sizes are correspondingly reduced by 20-26 bytes per file

"version": "FakeTSVersion",
"fileNames": [
"../../tslibs/TS/Lib/lib.d.ts",
"lib.d.ts",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be some special naming moniker to indicate that these paths are sanitized in some way? Or is it the case that fileNames is always relative paths and so this naming is okay?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the fileNames are relative to buildInfo so should be ok imo .. if need arises we can probably add some special character in the beginning to identify them

@sheetalkamat sheetalkamat added this pull request to the merge queue Aug 12, 2025
Merged via the queue into main with commit 18bc220 Aug 12, 2025
22 checks passed
@sheetalkamat sheetalkamat deleted the libInBuildInfo branch August 12, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsbuildinfo files include platform-specific paths

2 participants